Personal tools

Lua/Client/Render/Functions/ScreenToWorldDirection

From JC2-MP Documentation

< Lua‎ | Client‎ | Render
Jump to: navigation, search

Returns    Vector3
Prototype    Render:ScreenToWorldDirection(Vector2 position)
Description    Transforms a screenspace position to the corresponding directional vector in 3D space.


Examples

  • Drawing 3D models on the screen, such as an arrow pointing to some position.
  • Raycasting the world to spawn objects wherever you click.